﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using Microsoft.Data.SqlClient;

namespace Asion.Dapper
{
    /// <summary>
    /// SqlServer 数据提供
    /// </summary>
    public  class SqlServerDbProvider : DbProvider
    {
        public override DbProviderFactory Factory => SqlClientFactory.Instance;


        public DbConnection GetConnection(string connectionString)
        {
            var conn = Factory.CreateConnection()!;
            conn.ConnectionString = connectionString;
            return conn;
        }
    }
}
